-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplies logic to just forward to other methods, makes stats tracking consistent. #46
base: master
Are you sure you want to change the base?
Simplies logic to just forward to other methods, makes stats tracking consistent. #46
Conversation
deckarep
commented
Oct 17, 2018
- Simplifying logic that's duplicated
- Makes stats consistent with how they're getting cleared and locates them to a single method.
…nt where some weren't being fully cleared
segment.go
Outdated
atomic.StoreInt64(&seg.hitCount, 0) | ||
atomic.StoreInt64(&seg.missCount, 0) | ||
atomic.StoreInt64(&seg.overwrites, 0) | ||
atomic.StoreInt64(&seg.totalCount, 0) | ||
atomic.StoreInt64(&seg.totalTime, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
totalTime and totalCount is not stats.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When Cache.ResetStatistics
is called, we don't want to change them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks for pointing that out. I will follow up with a fix.
@coocood - ok, finally got around to making the change. Please review and thank you. |
atomic.StoreInt64(&seg.totalEvacuate, 0) | ||
atomic.StoreInt64(&seg.totalExpired, 0) | ||
atomic.StoreInt64(&seg.overwrites, 0) | ||
atomic.StoreInt64(&seg.entryCount, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not stats.